<ng-container [formGroup]="form">
  <ix-input
    formControlName="host"
    [label]="'Hostname' | translate"
    [required]="true"
    [tooltip]="helptext.snmpTrap.hostTooltip | translate"
  ></ix-input>

  <ix-input
    formControlName="port"
    type="number"
    [label]="'Port' | translate"
    [tooltip]="helptext.snmpTrap.portTooltip | translate"
  ></ix-input>

  <ix-checkbox
    formControlName="v3"
    [label]="'SNMPv3 Security Model' | translate"
  ></ix-checkbox>

  @if (isV3) {
    <ix-input
      formControlName="v3_username"
      [label]="'Username' | translate"
      [required]="true"
      [tooltip]="helptext.snmpTrap.usernameTooltip | translate"
    ></ix-input>

    <ix-input
      formControlName="v3_authkey"
      [label]="'Secret Authentication Key' | translate"
      [tooltip]="helptext.snmpTrap.authKeyTooltip | translate"
    ></ix-input>

    <ix-input
      formControlName="v3_privkey"
      [label]="'Secret Encryption Key' | translate"
      [tooltip]="helptext.snmpTrap.privateKeyTooltip | translate"
    ></ix-input>

    <ix-select
      formControlName="v3_authprotocol"
      [label]="'Authentication Protocol' | translate"
      [options]="authProtocols$"
      [required]="true"
      [tooltip]="helptext.snmpTrap.authProtocolTooltip | translate"
    ></ix-select>

    <ix-select
      formControlName="v3_privprotocol"
      [label]="'Encryption Protocol' | translate"
      [options]="privProtocols$"
      [required]="true"
      [tooltip]="helptext.snmpTrap.encryptionProtocolTooltip | translate"
    ></ix-select>
  }

  <ix-input
    formControlName="community"
    [label]="'SNMP Community' | translate"
    [tooltip]="helptext.snmpTrap.communityTooltip | translate"
  ></ix-input>
</ng-container>
